namespace VAdvantage.Model
{

/** Generated Model - DO NOT CHANGE */
using System;
using System.Text;
using VAdvantage.DataBase;
using VAdvantage.Common;
using VAdvantage.Classes;
using VAdvantage.Process; using VAdvantage.ProcessEngine;
using VAdvantage.Model;
using VAdvantage.Utility;
using System.Data;
/** Generated Model for AD_ImportMap
 *  @author Jagmohan Bhatt (generated) 
 *  @version Vienna Framework 1.1.1 - $Id$ */
public class X_AD_ImportMap : PO
{
public X_AD_ImportMap (Context ctx, int AD_ImportMap_ID, String trxName) : base (ctx, AD_ImportMap_ID, trxName)
{
/** if (AD_ImportMap_ID == 0)
{
SetAD_ImportMap_ID (0);
}
 */
}
public X_AD_ImportMap (Ctx ctx, int AD_ImportMap_ID, String trxName) : base (ctx, AD_ImportMap_ID, trxName)
{
/** if (AD_ImportMap_ID == 0)
{
SetAD_ImportMap_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ImportMap (Context ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ImportMap (Ctx ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ImportMap (Ctx ctx, IDataReader dr, String trxName) : base(ctx, dr, trxName)
{
}
/** Static Constructor 
 Set Table ID By Table Name
 added by ->Harwinder */
static X_AD_ImportMap()
{
 Table_ID = Get_Table_ID(Table_Name);
 model = new KeyNamePair(Table_ID,Table_Name);
}
/** Serial Version No */
static long serialVersionUID = 27562514361702L;
/** Last Updated Timestamp 7/29/2010 1:07:24 PM */
public static long updatedMS = 1280389044913L;
/** AD_Table_ID=1000020 */
public static int Table_ID;
 // =1000020;

/** TableName=AD_ImportMap */
public static String Table_Name="AD_ImportMap";

protected static KeyNamePair model;
protected Decimal accessLevel = new Decimal(4);
/** AccessLevel
@return 4 - System 
*/
protected override int Get_AccessLevel()
{
return Convert.ToInt32(accessLevel.ToString());
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Context ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Ctx ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public override String ToString()
{
StringBuilder sb = new StringBuilder ("X_AD_ImportMap[").Append(Get_ID()).Append("]");
return sb.ToString();
}
/** Set Column.
@param AD_Column_ID Column in the table */
public void SetAD_Column_ID (int AD_Column_ID)
{
if (AD_Column_ID <= 0) Set_Value ("AD_Column_ID", null);
else
Set_Value ("AD_Column_ID", AD_Column_ID);
}
/** Get Column.
@return Column in the table */
public int GetAD_Column_ID() 
{
Object ii = Get_Value("AD_Column_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set AD_ImportMap_ID.
@param AD_ImportMap_ID AD_ImportMap_ID */
public void SetAD_ImportMap_ID (int AD_ImportMap_ID)
{
if (AD_ImportMap_ID < 1) throw new ArgumentException ("AD_ImportMap_ID is mandatory.");
Set_ValueNoCheck ("AD_ImportMap_ID", AD_ImportMap_ID);
}
/** Get AD_ImportMap_ID.
@return AD_ImportMap_ID */
public int GetAD_ImportMap_ID() 
{
Object ii = Get_Value("AD_ImportMap_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Tab.
@param AD_Tab_ID Tab within a Window */
public void SetAD_Tab_ID (int AD_Tab_ID)
{
if (AD_Tab_ID <= 0) Set_Value ("AD_Tab_ID", null);
else
Set_Value ("AD_Tab_ID", AD_Tab_ID);
}
/** Get Tab.
@return Tab within a Window */
public int GetAD_Tab_ID() 
{
Object ii = Get_Value("AD_Tab_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void SetAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) Set_Value ("AD_Table_ID", null);
else
Set_Value ("AD_Table_ID", AD_Table_ID);
}
/** Get Table.
@return Database Table information */
public int GetAD_Table_ID() 
{
Object ii = Get_Value("AD_Table_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Window.
@param AD_Window_ID Data entry or display window */
public void SetAD_Window_ID (int AD_Window_ID)
{
if (AD_Window_ID <= 0) Set_Value ("AD_Window_ID", null);
else
Set_Value ("AD_Window_ID", AD_Window_ID);
}
/** Get Window.
@return Data entry or display window */
public int GetAD_Window_ID() 
{
Object ii = Get_Value("AD_Window_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set ExcelColIndex.
@param ExcelColIndex ExcelColIndex */
public void SetExcelColIndex (Decimal? ExcelColIndex)
{
Set_Value ("ExcelColIndex", (Decimal?)ExcelColIndex);
}
/** Get ExcelColIndex.
@return ExcelColIndex */
public Decimal GetExcelColIndex() 
{
Object bd =Get_Value("ExcelColIndex");
if (bd == null) return Envs.ZERO;
return  Convert.ToDecimal(bd);
}
/** Set ExcelColName.
@param ExcelColName ExcelColName */
public void SetExcelColName (String ExcelColName)
{
if (ExcelColName != null && ExcelColName.Length > 50)
{
log.Warning("Length > 50 - truncated");
ExcelColName = ExcelColName.Substring(0,50);
}
Set_Value ("ExcelColName", ExcelColName);
}
/** Get ExcelColName.
@return ExcelColName */
public String GetExcelColName() 
{
return (String)Get_Value("ExcelColName");
}
}

}
